/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author cxw
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '/@/api/model/baseModel';

const { adminPath } = useGlobSetting();

export interface ProcessPushTable extends BasicModel<ProcessPushTable> {
  userName?: string; // 用户名
  userId?: string; // 用户id
  enterpriseCode?: string; // 企业编号
  enterpriseName?: string; // 企业名称
  dataType?: string; // 数据类型
  createdTime?: string; // 添加时间
  updateTime?: string; // 更新时间
  content?: string; // 报警内容
}

export const processPushTableList = (params?: ProcessPushTable | any) =>
  defHttp.get<ProcessPushTable>({ url: adminPath + '/process/pushTable/list', params });

export const processPushTableListData = (params?: ProcessPushTable | any) =>
  defHttp.post<Page<ProcessPushTable>>({ url: adminPath + '/process/pushTable/listData', params });

export const processPushTableForm = (params?: ProcessPushTable | any) =>
  defHttp.post<ProcessPushTable>({ url: adminPath + '/process/pushTable/form', params });

export const processPushTableSave = (params?: any, data?: ProcessPushTable | any) =>
  defHttp.postJson<ProcessPushTable>({ url: adminPath + '/process/pushTable/save', params, data });

export const processPushTableDelete = (params?: ProcessPushTable | any) =>
  defHttp.get<ProcessPushTable>({ url: adminPath + '/process/pushTable/delete', params });
